<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="../struts_taglib.jsp"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>  
  <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
  <title>物资管理/礼品/查询</title>
  <%@ include file="../link_script.jsp" %>
  <script src="js/pmis/pmis-present.js" language="javascript" type="text/javascript"></script>
</head>
<body>
<form action="present.do?method=queryPresent_Do" method="post">  
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <%@ include file="present_button_list.jsp" %>
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="8" background="images/tab_12.gif">&nbsp;</td>
        <td><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#b5d6e6">
          <tr><td width="100%" class="STYLE11">&nbsp;<b>礼品名称：</b><input type="text" id="presentName" name="presentName" value="${presentName }" size="60" /></td></tr>
          <tr><td width="100%" class="STYLE11">&nbsp;<b>卖家：</b></td></tr>
          <tr><td width="100%" class="STYLE11">&nbsp;<input type="submit" value="查询"/><input type="reset" value="清空"/></td></tr> 
        </table></td>
        <td width="8" background="images/tab_15.gif">&nbsp;</td>
      </tr>
    </table></td>
  </tr>
  <logic:notEmpty name="presentList">
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="8" background="images/tab_12.gif">&nbsp;</td>
        <td><table id="theObjTable" width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#b5d6e6" onMouseOver="javascript:changeto();" onmouseout="javascript:changeback();">
          <tr>
            <td width="4%" class="tdClass">选择</td>
            <td width="4%" class="tdClass">序号</td>
            <td width="22%" class="tdClass">商品名称</td>
            <td width="8%" class="tdClass">商品类型</td>
            <td width="4%" class="tdClass">状态</td>
            <td width="8%" class="tdClass">购买日期</td>
            <td width="7%" class="tdClass">价格/￥</td>
            <td width="6%" class="tdClass">卖家</td>
            <td width="15%" class="tdClass">描述</td>
            <td width="4%" class="tdClass">结算</td>
            <td width="10%" class="tdClass">常用操作</td>
            <td width="*" class="tdClass"></td>           
          </tr>
          <logic:notEmpty name="presentList">
          <% int i = 0; %>
            <logic:iterate id="var" name="presentList">
            <% i++; %>
              <tr>
                <c:if test="${var.presentState=='0'}">
                <td class="STYLE12"><input type="checkbox" name="ids" value="${var.presentID}" /></td>
                <td class="STYLE12"><%=i %></td>
                <td class="STYLE11">&nbsp;<bean:write name="var" property="presentName" /></td>
                <c:if test="${var.presentType=='1'}"><td class="STYLE11">&nbsp;食品茶饮</td></c:if>
                <c:if test="${var.presentType=='0'}"><td class="STYLE11">&nbsp;服饰鞋帽</td></c:if>
                <c:if test="${var.presentType=='2'}"><td class="STYLE11">&nbsp;日常用品</td></c:if>
                <c:if test="${var.presentType=='3'}"><td class="STYLE11">&nbsp;数码家电</td></c:if>
                <c:if test="${var.presentType=='5'}"><td class="STYLE11">&nbsp;其它</td></c:if>
                <c:if test="${var.presentState=='0'}"><td class="STYLE12">
                <a href="present.do?method=statePresent&state=yiyong&pageNum=${pageNum}&presentID=${var.presentID}">已用</a></td></c:if>
                <c:if test="${var.presentState=='1'}"><td class="STYLE12">
                <a href="present.do?method=statePresent&state=weiyong&pageNum=${pageNum}&presentID=${var.presentID}"><font color="red"><b>未用</b></font></a></td></c:if>
                <td class="STYLE12"><bean:write name="var" property="presentDate" /></td>
                <td class="STYLE13"><bean:write name="var" property="presentExpenses" />￥&nbsp;</td>
                <td class="STYLE11">&nbsp;<bean:write name="var" property="shop.shopName" /></td>
                <td class="STYLE11">&nbsp;<bean:write name="var" property="presentDesc" /></td>
                <c:if test="${var.presentPay=='0'}">
                <td class="STYLE12">已结</td>
                <td class="STYLE12"><a href="present.do?method=detailPresent&presentID=${var.presentID}">明细</a>&nbsp;结算</td>
                </c:if>
                <c:if test="${var.presentPay=='1'}">
                <td class="STYLE12"><font color="red"><b>未结</b></font></td>
                <td class="STYLE12"><a href="present.do?method=detailPresent&presentID=${var.presentID}">明细</a>&nbsp;<a href="present.do?method=payPresent&presentID=${var.presentID}&pageNum=${pageNum}">结算</a></td>
                </c:if>
                <td class="STYLE12">&nbsp;&nbsp;</td>
                </c:if>
                <c:if test="${var.presentState=='1'}">
                <td class="STYLE22"><input type="checkbox" name="ids" value="${var.presentID}" /></td>
                <td class="STYLE22"><%=i %></td>
                <td class="STYLE21">&nbsp;<bean:write name="var" property="presentName" /></td>
                <c:if test="${var.presentType=='1'}"><td class="STYLE21">&nbsp;食品茶饮</td></c:if>
                <c:if test="${var.presentType=='0'}"><td class="STYLE21">&nbsp;服饰鞋帽</td></c:if>
                <c:if test="${var.presentType=='2'}"><td class="STYLE21">&nbsp;日常用品</td></c:if>
                <c:if test="${var.presentType=='3'}"><td class="STYLE21">&nbsp;数码家电</td></c:if>
                <c:if test="${var.presentType=='5'}"><td class="STYLE21">&nbsp;其它</td></c:if>
                <c:if test="${var.presentState=='0'}"><td class="STYLE22">
                <a href="present.do?method=statePresent&state=yiyong&pageNum=${pageNum}&presentID=${var.presentID}">已用</a></td></c:if>
                <c:if test="${var.presentState=='1'}"><td class="STYLE22">
                <a href="present.do?method=statePresent&state=weiyong&pageNum=${pageNum}&presentID=${var.presentID}"><font color="red"><b>未用</b></font></a></td></c:if>
                <td class="STYLE22"><bean:write name="var" property="presentDate" /></td>
                <td class="STYLE23"><bean:write name="var" property="presentExpenses" />￥&nbsp;</td>
                <td class="STYLE21">&nbsp;<bean:write name="var" property="shop.shopName" /></td>
                <td class="STYLE21">&nbsp;<bean:write name="var" property="presentDesc" /></td>
                <c:if test="${var.presentPay=='0'}">
                <td class="STYLE22">已结</td>
                <td class="STYLE22"><a href="present.do?method=detailPresent&presentID=${var.presentID}">明细</a>&nbsp;结算</td>
                </c:if>
                <c:if test="${var.presentPay=='1'}">
                <td class="STYLE22"><font color="red"><b>未结</b></font></td>
                <td class="STYLE22"><a href="present.do?method=detailPresent&presentID=${var.presentID}">明细</a>&nbsp;<a href="present.do?method=payPresent&presentID=${var.presentID}&pageNum=${pageNum}">结算</a></td>
                </c:if>
                <td class="STYLE22">&nbsp;&nbsp;</td>
                </c:if>
              </tr>
            </logic:iterate>
          </logic:notEmpty>
        </table></td>
        <td width="8" background="images/tab_15.gif">&nbsp;</td>
      </tr>
    </table></td>
  </tr>
  <%@ include file="../no_page.jsp"%>
  </logic:notEmpty>
  <logic:empty name="presentList"><%@ include file="../no_page.jsp"%></logic:empty>
</table>
</form>
</body>
</html>

